package com.yupi.springbootinit.statemachine.enums;

import com.yupi.springbootinit.statemachine.core.Event;

/**
 * 质检任务事件枚举
 * 定义质检任务状态转换的触发事件
 */
public enum QualityInspectionEventEnum implements Event {
    
    /**
     * 开始检验
     */
    START_INSPECTION("START_INSPECTION", "开始检验"),
    
    /**
     * 检验合格
     */
    PASS_INSPECTION("PASS_INSPECTION", "检验合格"),
    
    /**
     * 检验不合格
     */
    FAIL_INSPECTION("FAIL_INSPECTION", "检验不合格"),
    
    /**
     * 完成检验
     */
    COMPLETE_INSPECTION("COMPLETE_INSPECTION", "完成检验"),
    
    /**
     * 重新检验
     */
    REINSPECT("REINSPECT", "重新检验"),
    
    /**
     * 取消检验
     */
    CANCEL_INSPECTION("CANCEL_INSPECTION", "取消检验");
    
    private final String code;
    private final String description;
    
    QualityInspectionEventEnum(String code, String description) {
        this.code = code;
        this.description = description;
    }
    
    @Override
    public String getCode() {
        return code;
    }
    
    @Override
    public String getDescription() {
        return description;
    }
    
    @Override
    public String getEventType() {
        return "QUALITY_INSPECTION";
    }
}
